package com.es.disped.dao.oj.mapper;

import com.es.disped.dao.oj.model.ShareCode;
import com.es.disped.dao.oj.model.ShareCodeExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;

public interface ShareCodeMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table share_code
     *
     * @mbg.generated Mon Jun 10 19:18:24 CST 2019
     */
    @SelectProvider(type=ShareCodeSqlProvider.class, method="countByExample")
    long countByExample(ShareCodeExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table share_code
     *
     * @mbg.generated Mon Jun 10 19:18:24 CST 2019
     */
    @DeleteProvider(type=ShareCodeSqlProvider.class, method="deleteByExample")
    int deleteByExample(ShareCodeExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table share_code
     *
     * @mbg.generated Mon Jun 10 19:18:24 CST 2019
     */
    @Delete({
        "delete from share_code",
        "where share_id = #{shareId,jdbcType=INTEGER}"
    })
    int deleteByPrimaryKey(Integer shareId);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table share_code
     *
     * @mbg.generated Mon Jun 10 19:18:24 CST 2019
     */
    @Insert({
        "insert into share_code (share_id, user_id, ",
        "language, share_time, ",
        "share_code)",
        "values (#{shareId,jdbcType=INTEGER}, #{userId,jdbcType=VARCHAR}, ",
        "#{language,jdbcType=VARCHAR}, #{shareTime,jdbcType=TIMESTAMP}, ",
        "#{shareCode,jdbcType=LONGVARCHAR})"
    })
    int insert(ShareCode record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table share_code
     *
     * @mbg.generated Mon Jun 10 19:18:24 CST 2019
     */
    @InsertProvider(type=ShareCodeSqlProvider.class, method="insertSelective")
    int insertSelective(ShareCode record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table share_code
     *
     * @mbg.generated Mon Jun 10 19:18:24 CST 2019
     */
    @SelectProvider(type=ShareCodeSqlProvider.class, method="selectByExampleWithBLOBs")
    @Results({
        @Result(column="share_id", property="shareId", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="user_id", property="userId", jdbcType=JdbcType.VARCHAR),
        @Result(column="language", property="language", jdbcType=JdbcType.VARCHAR),
        @Result(column="share_time", property="shareTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="share_code", property="shareCode", jdbcType=JdbcType.LONGVARCHAR)
    })
    List<ShareCode> selectByExampleWithBLOBs(ShareCodeExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table share_code
     *
     * @mbg.generated Mon Jun 10 19:18:24 CST 2019
     */
    @SelectProvider(type=ShareCodeSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="share_id", property="shareId", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="user_id", property="userId", jdbcType=JdbcType.VARCHAR),
        @Result(column="language", property="language", jdbcType=JdbcType.VARCHAR),
        @Result(column="share_time", property="shareTime", jdbcType=JdbcType.TIMESTAMP)
    })
    List<ShareCode> selectByExample(ShareCodeExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table share_code
     *
     * @mbg.generated Mon Jun 10 19:18:24 CST 2019
     */
    @Select({
        "select",
        "share_id, user_id, language, share_time, share_code",
        "from share_code",
        "where share_id = #{shareId,jdbcType=INTEGER}"
    })
    @Results({
        @Result(column="share_id", property="shareId", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="user_id", property="userId", jdbcType=JdbcType.VARCHAR),
        @Result(column="language", property="language", jdbcType=JdbcType.VARCHAR),
        @Result(column="share_time", property="shareTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="share_code", property="shareCode", jdbcType=JdbcType.LONGVARCHAR)
    })
    ShareCode selectByPrimaryKey(Integer shareId);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table share_code
     *
     * @mbg.generated Mon Jun 10 19:18:24 CST 2019
     */
    @UpdateProvider(type=ShareCodeSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") ShareCode record, @Param("example") ShareCodeExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table share_code
     *
     * @mbg.generated Mon Jun 10 19:18:24 CST 2019
     */
    @UpdateProvider(type=ShareCodeSqlProvider.class, method="updateByExampleWithBLOBs")
    int updateByExampleWithBLOBs(@Param("record") ShareCode record, @Param("example") ShareCodeExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table share_code
     *
     * @mbg.generated Mon Jun 10 19:18:24 CST 2019
     */
    @UpdateProvider(type=ShareCodeSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") ShareCode record, @Param("example") ShareCodeExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table share_code
     *
     * @mbg.generated Mon Jun 10 19:18:24 CST 2019
     */
    @UpdateProvider(type=ShareCodeSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(ShareCode record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table share_code
     *
     * @mbg.generated Mon Jun 10 19:18:24 CST 2019
     */
    @Update({
        "update share_code",
        "set user_id = #{userId,jdbcType=VARCHAR},",
          "language = #{language,jdbcType=VARCHAR},",
          "share_time = #{shareTime,jdbcType=TIMESTAMP},",
          "share_code = #{shareCode,jdbcType=LONGVARCHAR}",
        "where share_id = #{shareId,jdbcType=INTEGER}"
    })
    int updateByPrimaryKeyWithBLOBs(ShareCode record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table share_code
     *
     * @mbg.generated Mon Jun 10 19:18:24 CST 2019
     */
    @Update({
        "update share_code",
        "set user_id = #{userId,jdbcType=VARCHAR},",
          "language = #{language,jdbcType=VARCHAR},",
          "share_time = #{shareTime,jdbcType=TIMESTAMP}",
        "where share_id = #{shareId,jdbcType=INTEGER}"
    })
    int updateByPrimaryKey(ShareCode record);
}